package com.mh.shiro.framework.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import tk.mybatis.spring.annotation.MapperScan;

import javax.sql.DataSource;

/**
 * @Author: E-mail:
 * @Version: 创建时间：2019年06月21日20:58
 * @Description: <描述>
 */
@Configuration
@MapperScan("com.mh.shiro.persistence.mapper")
public class MybatisConfig {

    @Bean
    @ConfigurationProperties(prefix = "spring.datasource")
    public DataSource dataSource() {

        return new DruidDataSource();
    }
}
